1. Field of the Invention
This invention relates to content addressable memories.
2. Related Art
A CAM (content addressable memory) is sometimes used in a computer system or device for storing and retrieving information. CAMs have the advantage that they can rapidly link associated data with known tags; it is thus possible to perform rapid lookup of the associated data once the tag is known. Known CAMs include comparison circuits for matching an input tag with each tag recorded in the CAM, so as to determine which if any of the row or lines in the CAM matches the tag. If the input tag matches one or more tags recorded in the CAM, the CAM returns a matching entry (or an index thereof), also called a xe2x80x9chit.xe2x80x9d
In some known CAMs additional processing is performed on the value associated with the matching entry, such as to compare that associated value with a set of selected parameters and possibly validate or invalidate the associated value in response to those selected parameters. In the known art, special purpose circuits perform the additional processing, such as any compare-and-invalidate operations that may be desired.
A first problem in the known art is that special purpose circuits add complexity and take additional space on the chip in which the CAM is implemented. This limits the size of CAM that can be implemented in any chip of a pre-selected size, or limits the complexity or functionality of the special purpose circuits to be used with the CAM.
A second problem in the known art is that once the circuits embodying special purpose functions are embedded in the chip, they are fixed for that chip, and cannot generally be altered if new special purpose functions are desired.
A third problem in the known art is that circuits embodying special purpose functions do not always take the same amount of time to operate. This presents a drawback, in that operation of the CAM cannot be assured to take less time than the maximum time for any one of those special purpose functions. Where one or more special purpose function is a management function for clearing entries in the CAM, the time taken by that special purpose function can be quite large. This has a substantial effect on design of systems that include such a CAM.
Some known CAMs include a single status register for recording an index value for a result of the match. While this has the general advantage of providing the index value for later use by circuitry or a processor, it has the drawback that the status register would be overwritten by a next CAM operation, and so would be inefficient to attempt to use for generalized operations on the CAM. In practice, special logic is required because the status register is not useful.
Accordingly, it would be desirable to provide a technique for performing additional processing on CAM hit results, in which the additional processing does not add to the complexity or size of the CAM chip, in which the additional processing can be altered after manufacture of the CAM chip, and in which the additional processing does not delay other operations of the CAM. This advantage is achieved in an embodiment of the invention in which the CAM hit results are presented as indices into the CAM and sent to a hit result register file. The contents of the hit result register file can be processed by other hardware or software coupled to the CAM.
The invention provides a method and system for performing additional processing on CAM hit results, in which the additional processing does not add to the complexity or size of the CAM chip, can be altered after manufacture of the CAM chip, and does not delay other operations of the CAM. The CAM hit results returned from the CAM array and sent to a hit result register file where they are stored. The contents of the hit result register file can be processed by other hardware or software coupled to the CAM array. In a preferred embodiment, the index associated with the CAM input tag can be accessed using the hit result register file and a register indirect operation. In a preferred embodiment, the index associated with the CAM input tag can be used for CAM management functions in conjunction with (such as in parallel or pipelined) other CAM functions.